//-----------------------------------------------------------------------
// <copyright file="BulkOrder.cs" company="Pyramid Consulting">
//     Copyright (c) Pyramid Consulting. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
	
using System;
using System.Data;
using System.ComponentModel;
using System.Collections;

namespace MIMS.WRS.Entities
{
	[Serializable]
	public class BulkOrderEx : BulkOrder
	{
		public BulkOrderEx()
		{
			this.DiaOrLenS1 = Nulls.NullDecimal;
			this.DiaOrLenS2 = Nulls.NullDecimal;
			this.DiaOrLenS3 = Nulls.NullDecimal;
			this.DiaOrLenS4 = Nulls.NullDecimal;
			this.DiaOrLenS5 = Nulls.NullDecimal;
			this.DiaOrLenS6 = Nulls.NullDecimal;
			this.DiaOrLenS7 = Nulls.NullDecimal;
			this.DiaOrLenS8 = Nulls.NullDecimal;
			this.HeightS1 = Nulls.NullDecimal;
			this.HeightS2 = Nulls.NullDecimal;
			this.HeightS3 = Nulls.NullDecimal;
			this.HeightS4 = Nulls.NullDecimal;
			this.HeightS5 = Nulls.NullDecimal;
			this.HeightS6 = Nulls.NullDecimal;
			this.HeightS7 = Nulls.NullDecimal;
			this.HeightS8 = Nulls.NullDecimal;
			this.WidthS1 = Nulls.NullDecimal;
			this.WidthS2 = Nulls.NullDecimal;
			this.WidthS3 = Nulls.NullDecimal;
			this.WidthS4 = Nulls.NullDecimal;
			this.WidthS5 = Nulls.NullDecimal;
			this.WidthS6 = Nulls.NullDecimal;
			this.WidthS7 = Nulls.NullDecimal;
			this.WidthS8 = Nulls.NullDecimal;
		}


		public BulkOrderEx(BulkOrder bo, ProductDimensions pd)
		{

			this.BulkOrderID = bo.BulkOrderID;
			this.OrderDate = bo.OrderDate;
			this.Type = bo.Type;
			this.ProductCode = bo.ProductCode;
			this.Description = bo.Description;
			this.Color = bo.Color;
			this.StartDate = bo.StartDate;
			this.TotalQtyOrdered = bo.TotalQtyOrdered;
			this.TotalQtyCompleted = bo.TotalQtyCompleted;
			this.TotalQtyInProgressBelow50P = bo.TotalQtyInProgressBelow50P;
			this.TotalQtyInProgressAbove50P = bo.TotalQtyInProgressAbove50P;
			this.EstimatedDate = bo.EstimatedDate;
			this.StockLastCheckedDate = bo.StockLastCheckedDate;
			this.StockLastCheckedQty = bo.StockLastCheckedQty;
			this.FOB = bo.FOB;
			this.CompletedDate = bo.CompletedDate;
			this.SupplierCode = bo.SupplierCode;
			this.Owner = bo.Owner;
			this.Catalogue = bo.Catalogue;
			this.Page = bo.Page;
			this.Pack = bo.Pack;
			this.PackQty = bo.PackQty;
			this.CatalogID = bo.CatalogID;
			this.Target = bo.Target;
			this.SalesDescription1 = bo.SalesDescription1;
			this.SalesDescription2 = bo.SalesDescription2;
			this.StockLocation = bo.StockLocation;
			this.AvailableInUSA = bo.AvailableInUSA;
			this.BONo = bo.BONo;
			this.MinOrderQtyValue = bo.MinOrderQtyValue;
			this.MinOrderQty = bo.MinOrderQty;
			this.MinQtyVolume = bo.MinQtyVolume;
			this.TallPaletQty = bo.TallPaletQty;
			this.UnitSettingID = bo.UnitSettingID;
			this.IDSSortID = bo.IDSSortID;
			this.IsArchived = bo.IsArchived;
			this.CatPackDesc = bo.CatPackDesc;
			this.MUKTHGCatPackQty = bo.MUKTHGCatPackQty;
			this.MUKTHGCatPackDesc = bo.MUKTHGCatPackDesc;
			this.HomeDelivered15Price = bo.HomeDelivered15Price;
			this.CurrencyID = bo.CurrencyID;
			this.IsShownInLGDCatalog = bo.IsShownInLGDCatalog;
			this.SpecialOfferDisc = bo.SpecialOfferDisc;
			this.QtyUnitsPer40Cont = bo.QtyUnitsPer40Cont;
			this.QtyUnitsPer20Cont = bo.QtyUnitsPer20Cont;
			this.UnitWeight = bo.UnitWeight;
			this.HCC_Code = bo.HCC_Code;
			this.TerritoryID = bo.TerritoryID;
			this.ModifiedDate = bo.ModifiedDate;
			
			this.CompletedDate = bo.CompletedDate;			
			this.EstimatedDate = bo.EstimatedDate;
			this.FOB = bo.FOB;
			this.StartDate = bo.StartDate;
			this.StockLastCheckedDate =bo.StockLastCheckedDate;
			this.StockLastCheckedQty = bo.StockLastCheckedQty;
			this.TotalQtyCompleted = bo.TotalQtyCompleted;
			this.TotalQtyInProgressAbove50P  = bo.TotalQtyInProgressAbove50P;
			this.TotalQtyInProgressBelow50P =bo.TotalQtyInProgressBelow50P;	
			this.PackQty = bo.PackQty;
			this.CatalogID = bo.CatalogID;						
			this.IDSSortID = bo.IDSSortID;
			this.MUKTHGCatPackQty = bo.MUKTHGCatPackQty;
			this.HomeDelivered15Price = bo.HomeDelivered15Price;
			this.CurrencyID = bo.CurrencyID;
			this.SpecialOfferDisc = bo.SpecialOfferDisc;
			this.ModifiedDate =bo.ModifiedDate;
			this.QtyUnitsPer40Cont = bo.QtyUnitsPer40Cont;	
			this.QtyUnitsPer20Cont = bo.QtyUnitsPer20Cont;	
			this.UnitWeight = bo.UnitWeight;
			this.HCC_Code = bo.HCC_Code;
			this.QuantityAvailable = bo.QuantityAvailable;
//			this.IDSQuantityAvail = bo.IDSQuantityAvail;
//			this.OwnerCode = bo.OwnerCode;
//			this.TypeCode=bo.TypeCode;
//			this.TotalQtyNotStarted = bo.TotalQtyNotStarted;
			this.QuantityReserved = bo.QuantityReserved;
			this.NotStarted = bo.NotStarted;
			this.IDSSort = bo.IDSSort;
			this.CurrencyCode = bo.CurrencyCode;
			this.CatalogName = bo.CatalogName;
			this.UnitsPerOuter = bo.UnitsPerOuter;
			this.UnitFOBPrice = bo.UnitFOBPrice;


			if(pd!=null)
			{
				this.DimensionID = pd.DimensionID;
				this.DiaOrLenS1 = pd.DiaOrLenS1;
				this.DiaOrLenS2 = pd.DiaOrLenS2;
				this.DiaOrLenS3 = pd.DiaOrLenS3;
				this.DiaOrLenS4 = pd.DiaOrLenS4;
				this.DiaOrLenS5 = pd.DiaOrLenS5;
				this.DiaOrLenS6 =pd.DiaOrLenS6;
				this.DiaOrLenS7 = pd.DiaOrLenS7;
				this.DiaOrLenS8 =pd.DiaOrLenS8;
				this.HeightS1 = pd.HeightS1;
				this.HeightS2 = pd.HeightS2;
				this.HeightS3 = pd.HeightS3;
				this.HeightS4 = pd.HeightS4;
				this.HeightS5 = pd.HeightS5;
				this.HeightS6 = pd.HeightS6;
				this.HeightS7 = pd.HeightS7;
				this.HeightS8 = pd.HeightS8;
				this.WidthS1 = pd.WidthS1;
				this.WidthS2 =  pd.WidthS2;
				this.WidthS3 =  pd.WidthS3;
				this.WidthS4 =  pd.WidthS4;
				this.WidthS5 =  pd.WidthS5;
				this.WidthS6 =  pd.WidthS6;
				this.WidthS7 =  pd.WidthS7;
				this.WidthS8 =  pd.WidthS8;
				this.IsProductRound = pd.IsProductRound;
			}
		}

		#region Variable Declarations
		private bool		isProductRound;
		private int		dimensionID, bulkOrderID;
		private decimal		heightS6, widthS1, heightS4, heightS5, widthS2, widthS5, widthS6, widthS3, widthS4, diaOrLenS3, diaOrLenS4, diaOrLenS1, diaOrLenS2, diaOrLenS5, heightS2, heightS3, diaOrLenS6, heightS1;
		private decimal		heightS7,heightS8,widthS7,widthS8,diaOrLenS7,diaOrLenS8;
		#endregion

		public int DimensionID
		{
			get
			{
				return dimensionID;
			}
			set
			{
				dimensionID = value;
			}
		}


		public bool IsProductRound
		{
			get
			{
				return isProductRound;
			}
			set
			{
				isProductRound = value;
			}
		}


		public decimal DiaOrLenS1
		{
			get
			{
				return diaOrLenS1;
			}
			set
			{
				diaOrLenS1 = value;
			}
		}


		public decimal DiaOrLenS2
		{
			get
			{
				return diaOrLenS2;
			}
			set
			{
				diaOrLenS2 = value;
			}
		}


		public decimal DiaOrLenS3
		{
			get
			{
				return diaOrLenS3;
			}
			set
			{
				diaOrLenS3 = value;
			}
		}


		public decimal DiaOrLenS4
		{
			get
			{
				return diaOrLenS4;
			}
			set
			{
				diaOrLenS4 = value;
			}
		}


		public decimal DiaOrLenS5
		{
			get
			{
				return diaOrLenS5;
			}
			set
			{
				diaOrLenS5 = value;
			}
		}


		public decimal DiaOrLenS6
		{
			get
			{
				return diaOrLenS6;
			}
			set
			{
				diaOrLenS6 = value;
			}
		}

		public decimal DiaOrLenS7
		{
			get
			{
				return diaOrLenS7;
			}
			set
			{
				diaOrLenS7 = value;
			}
		}
		public decimal DiaOrLenS8
		{
			get
			{
				return diaOrLenS8;
			}
			set
			{
				diaOrLenS8 = value;
			}
		}

		public decimal HeightS1
		{
			get
			{
				return heightS1;
			}
			set
			{
				heightS1 = value;
			}
		}


		public decimal HeightS2
		{
			get
			{
				return heightS2;
			}
			set
			{
				heightS2 = value;
			}
		}


		public decimal HeightS3
		{
			get
			{
				return heightS3;
			}
			set
			{
				heightS3 = value;
			}
		}


		public decimal HeightS4
		{
			get
			{
				return heightS4;
			}
			set
			{
				heightS4 = value;
			}
		}


		public decimal HeightS5
		{
			get
			{
				return heightS5;
			}
			set
			{
				heightS5 = value;
			}
		}


		public decimal HeightS6
		{
			get
			{
				return heightS6;
			}
			set
			{
				heightS6 = value;
			}
		}
		public decimal HeightS7
		{
			get
			{
				return heightS7;
			}
			set
			{
				heightS7= value;
			}
		}
		public decimal HeightS8
		{
			get
			{
				return heightS8;
			}
			set
			{
				heightS8 = value;
			}
		}


		public decimal WidthS1
		{
			get
			{
				return widthS1;
			}
			set
			{
				widthS1 = value;
			}
		}


		public decimal WidthS2
		{
			get
			{
				return widthS2;
			}
			set
			{
				widthS2 = value;
			}
		}


		public decimal WidthS3
		{
			get
			{
				return widthS3;
			}
			set
			{
				widthS3 = value;
			}
		}


		public decimal WidthS4
		{
			get
			{
				return widthS4;
			}
			set
			{
				widthS4 = value;
			}
		}


		public decimal WidthS5
		{
			get
			{
				return widthS5;
			}
			set
			{
				widthS5 = value;
			}
		}


		public decimal WidthS6
		{
			get
			{
				return widthS6;
			}
			set
			{
				widthS6 = value;
			}
		}
		public decimal WidthS7
		{
			get
			{
				return widthS7;
			}
			set
			{
				widthS7 = value;
			}
		}
		public decimal WidthS8
		{
			get
			{
				return widthS8;
			}
			set
			{
				widthS8 = value;
			}
		}
	}
	
}